<?php

    function smarty_function_import($params, &$smarty)
	{
		$module = ModuleDAO::GetByName($params["module"]);
		$action = ActionDAO::GetByView($module->ID, $params["view"]);

		Page::LoadModule($module);
		$code = '$view = new '.$module->ClassPrefix."_".$action->ClassName.'($smarty->Page, $module, $action);';
		eval($code);
		$view->Render();

	}

?>
